Changed eventTypes to assign values directly
Cleaned up event handlers and switched to jQuery Event objects