Adding Hugh's write index removal
Merging in hng's changes from atorrez