Iron out a few bugs.
Add updated documentatino.