Logging + Misc cleanup