move helper methods to Helpers class and refactor other files