Added RD & WR checks, simulated write to memory. Untested.