Added Readme and Fixed a bit of the main code