Fix tests and docs