Add maximum for turning velocity.
Some refactoring.