Improved parser. Refactoring.