cleaned up logging and fixed the pile of stuff I broke in 3b2e43eaa4983b39cb0cb20d7852f7ef56f48731. Can't be bothered to write down the tickets this refs.