Revert "Merge branch 'search'"

This reverts commit 611b99d5c597cc6c5e784bbf98902532781fa3f1, reversing
changes made to 59dec18cfd657dde020444f5b2f8b6bc0e34d223.
tidying up createfragment