WIP Adapt for compilation