Better control; fix ackermann formula errors