fix switch_to deprecation warnings
cleanup crap