Adding remove_hook functionality.