Rewrite event/hooks system for the most part.