Added a few tests and updated docs.