Started implementing memory management