Add _compat module
Use @metaclass decorator in relevant places
Don't use relative imports
Protect against multiple calls to install()