Fixed some tests and doco.