[style] Disabled jshint warnings about missing semicolons, replaced " by '
[style] 'use strict' in libs, removed trailing whitespace, fixed a couple of 'used before declared' warnings (which are bugus if you ask me)
[style] Always use curly braces after if
[style] use dot notation instead of [] where possible
[style] always declare variables