Bugfix

Fixes a couple of bugs that were causing HEAD not to function and adds some tests.
We are calling this everytime for now because we are re-enabling search suggestions (i.e. they will be left alone now, respecting the defaults). The functions in here are atomic so it doesn't hurt to call them more than once. We definitely do still need to make a settings panel though.