Refactor helpers.
Merge pull request #7 from rjackson/refactor_helpers

Refactor helpers.