Implemented better error handling in parser & code generator.