Some quick cleanup on Javascript and tests.