small changes to code and comments