Convert parser.coffee to parser.js
Remove use of 'self' in parser.js