Changing how memory is allocated
Fixing a small bug with memory adding