Refactoring

Minor changes & style cleanup:

* replace hashrockets since we require at least ruby 1.9.2
* flip negative conditionals
* remove an unused local variable
* remove some unnecessary module scopes