Added functions to handle custom ALMemory events.