various cleanup:
- add jshint annotations
- use node core idioms
- rename utils to helpers