Refactoring theme to move logic to toolbox.

@hippee-lee @tsanko @kevinsproles Made some updates as part of the refactoring the theme story. This is part of the header controller refactoring. I also fixed an issue with the search (a typo on the sort field)