WIP: more progress on compiled planner