Using vars on prototype for event type instead of hardcoding