ready for wedge
moved most code into CodeBuilder module