make test flexible wrt size, other cleanup