Added more regression tests
Added more regression tests and fixed warnings