Move event handler function to the state instead of on the event itself. Add Redis storage