Implemented writeback with stalled draining.

info on writebacks, pratial

Attempting to block until drained. Not working

Writeback seems to work

Fix test for flushing