Cleanup warnings in tests, better logging.