Added first version of memory circuit.