Separated out some of the functionality in 'main' (for cleanup purposes)
No additional functionality