scripts/hooks functionality added, lint fixes, rebased on latest, and fix for uninstall failing with no hooks