Refactor search code in controllers
Merge pull request #97 from mud-turtles-2014/styling

Refactor search code in controllers