A memory controller (101,201), comprising: a front end channel, wherein the front end channel includes a front end direct memory access; and a back end channel (210-1,..., 210-N), wherein the back end channel (210-1,..., 210-N) includes: a back end DMA (213-1, 213-N) coupled to the front end DMA and configured to: couple the front end channel to the back end channel (210-1,..., 210-N); and receive data to be programmed to a memory array (130-1,..., 130-N, 230-1,..., 230-N) from the front end DMA; a command queue (215-1,..., 215-N, 315, 415) configured to hold commands; and circuitry (211-1,..., 211-N) configured to: modify at least a number of commands in the queue (215-1,..., 215N, 315, 415), if the number of commands in the queue (215-1,..., 215-N, 315, 415) can be combined into a command, and thereby combine a number of overlapping commands into a command; and execute the modified commands; wherein: said circuitry (211-1,...., 211-N) which is configured to modify at least the number of commands in the queue (215-1,..., 215-N, 315, 415) is also configured to delete a command in the queue (215-1,..., 215-N, 315, 415), wherein the command to be deleted is a command which would be overwritten by another command in the queue (215-1,..., 215-N, 315, 415). a front end channel, wherein the front end channel includes a front end direct memory access; and a back end channel (210-1,..., 210-N), wherein the back end channel (210-1,..., 210-N) includes: a back end DMA (213-1, 213-N) coupled to the front end DMA and configured to: couple the front end channel to the back end channel (210-1,..., 210-N); and receive data to be programmed to a memory array (130-1,..., 130-N, 230-1,..., 230-N) from the front end DMA; a back end DMA (213-1, 213-N) coupled to the front end DMA and configured to: couple the front end channel to the back end channel (210-1,..., 210-N); and receive data to be programmed to a memory array (130-1,..., 130-N, 230-1,..., 230-N) from the front end DMA; couple the front end channel to the back end channel (210-1,..., 210-N); and receive data to be programmed to a memory array (130-1,..., 130-N, 230-1,..., 230-N) from the front end DMA; a command queue (215-1,..., 215-N, 315, 415) configured to hold commands; and circuitry (211-1,..., 211-N) configured to: modify at least a number of commands in the queue (215-1,..., 215N, 315, 415), if the number of commands in the queue (215-1,..., 215-N, 315, 415) can be combined into a command, and thereby combine a number of overlapping commands into a command; and execute the modified commands; modify at least a number of commands in the queue (215-1,..., 215N, 315, 415), if the number of commands in the queue (215-1,..., 215-N, 315, 415) can be combined into a command, and thereby combine a number of overlapping commands into a command; and execute the modified commands; wherein: said circuitry (211-1,...., 211-N) which is configured to modify at least the number of commands in the queue (215-1,..., 215-N, 315, 415) is also configured to delete a command in the queue (215-1,..., 215-N, 315, 415), wherein the command to be deleted is a command which would be overwritten by another command in the queue (215-1,..., 215-N, 315, 415). said circuitry (211-1,...., 211-N) which is configured to modify at least the number of commands in the queue (215-1,..., 215-N, 315, 415) is also configured to delete a command in the queue (215-1,..., 215-N, 315, 415), wherein the command to be deleted is a command which would be overwritten by another command in the queue (215-1,..., 215-N, 315, 415).