cleanup some code of parsers