Handling events

Implement HandlingEventRepository, plus some other tidying up.