parsing improved a bit. Refactoring.