some more refactoring
query works but is in desperate need of refactoring
add home#query route
add this so controller is not so fat