Replace move constructors in controller by factory

This makes it possible to reasonably test the controller.