Initial refactor of events controller