DAR-1159, fix JSHint errors and apply Wikia JS styleguide formatting