Refactored / reorganized the code to be more OO. Some things probably stopped working in the process.
Fixed Document#plain
Small tweaks.
Prepared Sphinx docs.
camayak