WiP, refactoring memory structures