Update docs, add tests