Crucial error fixed and improved documentation

Discovered and fixed a crucial import error. Also expanded the README
file and converted it to markdown, and added autogenerated html
documentation.