cleanup; fixed tests