more restructuring and fixing
more fixes...