Move all non-main functions into utils.py and refactor args
Added new test stubs
Refactoring a few things