Initial split-up on control.c
As a first step to refactoring control.c, let's split it up.