more restructuring, cleanup