Documentation work.

Almost everything has been fully documented.
I also fixed a few minor errors.

README has been updated.