Code is now generalized to more switches than assist and grade.