added test suite and minor formatting changes