Finally getting around to implementing some unit tests. Some refactoring
involved to enable easier testing.
56: Completed (mostly) refactoring work for Helpers
centralize constants and bug fix.