Move view into controller and fill out missing tests