get event.py out of model, and do some cleanup in orm.py