refactored some methods into Util, renamed classes to clarify purpose