parser modularization, some stuff reworked