Remove unused error class
Make all helper methods private
Tweak tests