Fix up tests, add documentation to README