Made code jslint comliant