Overhaul event system, using onevent for events