added use strict, linted code us jshint, and added some comments