Cleanup logging and tests