Added more regression tests and docs