Bring addResource back so that tests pass
fix minor lint issue in parser.js