Adding ugly install script and improving the hook