Implementing first draft of memory management of 2d memory blocks