Reorganize parser.js