Rework compat files to be more embeddable