Adding small changes to main that clean up the code.