cleaning up compatibility code

to make it easier to find and manage