reduce temp variables
More tests & partial bulk write support.