Initial commit of memory functions.