Added helper debug code / helpful comments