Small fixes.
Fix to parser bugs, some unit refactoring.