Clean up logs, fix some tests.