cleaning things up and adding comments