Fix several flash driver issues and stub out more of flush