Refactored methods to a modules file to make the project more extensible