tests and docs, and a slight interface change.