cleaned up a bit, plus made robust to handling weird robots, e.g. those without motors