Added documentation to the README and documented / beautified the code