minor reformatting
fix switch_to deprecation warnings