Added tests for startup hooks
Fixed shutdown hooks, added tests