Some logging + minor fixes/changes