Code cleanup & DMA support for the Mark1