Stripped the main of its own stuff and instead hooked it up to the rest of the program