Updated for latest version of Core, with log cleanup