some more corrections and cleaning