JSHint and general cleanup

Mostly semi-colons and quote vs double-quote.
Also cleaned up some module declarations.