Improved Hooks management
Added support for Cloud Code function