Better interface for hooks + thread safety