Small fixes and log cleanup