Add constants for EventTypes.
Remove setters as they're mostly useless.
Format code and add comments.