cleaning code and adding comments to readme