Added docs and some other changes.