Moved events into new folders and cleaned up code