More tests and doc