Version that compiles: DO NOT USE CURVE EDIT, WIP!