Refactored the event modules so that logic for handler implementation is in its own file.