Code jslinted and fixed messy indentation