cleaning up comments, simplifying code