Refactor to use dmac/spin