Updated the readme and added a few code comments