Deleted unnecessary compat.py

Moved respective compatibility functions to files where they were needed