Restructured to do all writes before starting reads