Add memory and memory unit tests