Add fixes for Memory

Memory is now partially working