Add support for onUnload for controllers and models