code and comments cleanup