Fixed lots of minor documentation bugs. Added some docs.