Removed unnecessary libraries and associated references. Changed the events section to handle different times.