Brought in some old control surface code to reuse