Reorganized part of the dude controller.