Cleanup of logging and testing