added test suite and streamlined some functionality