Updated engine and script lifecycle callback functions.
A bit of a math function shuffle.
Renamed Events to Subject and renamed Categories to Category.