Little refactoring and parser improvement