Refactor and first implementation of SPI erase.