Change onActivate and onDeactivate to be methods not properties