Mostly changes to logging