Adding docs and finishing tests.