Partial cleanup for search install.
Update rule to use function