Some javascript code cleanups

platform:  # supported: 2.0.4, 2.1.6, 2.2.3
backlogs:  # supported: 0.9.35
ruby:  # supported: 1.9.3, 1.8.7