Magnetic random-access memory (MRAM) stacks with perpendicular magnetic anisotropy (PMA) based on spin-transfer torque (STT) are expected to be used in the next generation of high speed, low power, memory applications. As device dimensions are scaled down, the total PMA of the MgO/CoFeB system is increased by embedding CoFeB between two MgO layers. We compare the properties of a continuous free layer versus a composite design in which a Ta insertion layer is introduced into the free layer, the latter being the design of choice in the literature. We used transmission electron microscopy and secondary ion mass spectrometry depth profiling to determine the role the Ta spacer plays as an oxygen scavenger. Our results indicate that optimal control of the oxygen content and diffusion are important for the thermal robustness and PMA of the free layers embedded between two MgO layers.