Fixing jshint warnings
reformat code