improved profiling setup, fixed memory leak in parser
refactoring error propagation