Lots of changes to add docs.