more and more code cleanup