Controlling Ionic Transport in RRAM for Memory and Neuromorphic Computing Applications