Refactor event application and snapshot creation