Remove erroneous return statements and add some proper error handling to the parser.

toString could probably do with some refactoring, or checks to see if
the message it's producing is actually valid.