Various changes to make controllers a bit more modular.