Changes to detect estop. (and simulate it for testing)