improved parser + small fixes