Fixed errors in the code.
Adding more info about the implementation. Cleanup of the README.