Changed structure of parser code