Improve test and docs