Add category param to content type search
Refactor search api to use a single class.
Refactor search so it is self contained in one class.