general code and comment cleanup