added comments to event_manager, changed how event_manager keeps track of custom event and hook handlers, added more tests.

Signed-off-by: Miethpo <miethpomail@yahoo.co.uk>