Refactor parser, removing exception