Simplify the rotWait routine to make it maintainable.