Moved helper methods into a helper class