Progress on parser

Progressed on parser, improved syntax error message format and fixed a
few small errors