Move query up to the controller.

Not using instance variables. Started doing that to keep variable
scoping sane, for example they are not automatically forwarded to
partials.