Refactor compat/