close() goes through all the events and handles all the resource loads