Fix some tests
Clean up logging a bit