Refactored piskel controller to extract the event creation