Added install/uninstall hooks

Still completely untested.