cleaning up and minor comments