debug restructure

all compiling except particular files. isolated issues for diagnosis to
run in komodo tomorrow.