Refactor parser, remove unused exceptions