Added more tests, fixed doco