jhint fixes; more OCD refactoring