Cleaning up main.