Finish tests and add docs.