fix JSHint warnings, indentation & use strict