small corrections and some more restructuring