Added activated and deactivated callbacks

Also removed redundant 'testFunctions' method.