Added a real-time timer to main(), cleaned house