The comment (repeated more than once) that Johannes should have told the young king that the blue room was a broom closet is the first of three suggestions the narrator makes in the book for an alternative explanation that would have kept the king from looking inside; the other two are that it's a fake door for decoration and that it's the ladies' bathroom, best not go poking your head inside.
The story of the human servants of the king turning into ravens who are then cursed to tell the story is not from the book, although there are two human servants named Wilhelm and Jacob who listen to Hansel and Gretel tell their story at the end and transmit it to the entire kingdom (it's Wilhelm's idea, though, and done for the sole purpose of keeping the people occupied and informing them of what has happened); the ravens, who can see the future, are the ones who accidentally let slip about the three curses to Johannes when he overhears them (all three) talking on the ship in the book, not unlike in this episode.
This episode and the three previous ("The Monster Within," "A Smile As Red As Blood," and "Three Golden Hairs") split up the stories contained in the fifth and sixth chapters of the original book, A Smile As Red As Blood (which tells Gretel's story) and The Three Golden Hairs (which tells Hansel's). This episode also contains the story from the first chapter of the book (also called Faithful Johannes), which Hansel and Gretel don't learn until this part of the story (both in the book and in the show).
The episode name and story is taken from the first chapter of the original book; of the eight episodes named after (and taking their stories from) original chapters this is the only one out of order, likely because while the reader learns this story right at the beginning, Hansel and Gretel don't learn it until this point in the story (Gretel in A Smile As Red As Blood from the three ravens and Hansel in The Three Golden Hairs from Johannes himself in the situation shown in this episode; these are implied to be simultaneous in the book).
The ravens (unnamed in the books) are called Wilhelm/William, Jacob, and Dotty. Wilhelm (the German form of William) and Jacob Grimm are the brothers who collected Grimm's fairytales on which this story is based and their mother's name was Dorothea, for which Dotty is a common nickname. "Dotty" is also a slang word that means "crazy" or "not altogether there." They are all male in the book.