cleanups, fixing a small bug; todo is adding additional tests and documentation