more restructuring; trying to get modules working