Move memory to its own module