remove needless function duplication in private class
remove crufty unused functions, used constBegin/End for iterations, store itEnd during loop, various other cleanups