Update README.md
Add documentation, fix several bugs