Extract the controller and view helper into a single module

It can be shared between the two at the moment.