Split two functions into seperate modules in effort to clean up the main.py file.