Cleaned up Main.