MP1-4155: changed flow in parser, implemented some methods generally