Refactoring, robot controller, no master thread, single instances of main threads