Ported in a new write method.
No activesupport.
Test for batching other operations with the write.
Refactor.