code and comments clean-up, minor adjustments