Simplifying turning code