WIP
Finish migrating to use compgl + other changes, tests not yet updated