Added DbgPrint (enabled by -Ddbg=on) and modified Heat