refactoring and starting to migrate functionality to module instead of repeatative classes