Create more functions to clean up main