Move pinning etc logic to the omnibox model.

Also fixes #113