Some cleanup and jslinting