Memory loop edits for Kern utils