Better organization of extension type compilation