reorganized the controller input and state systems