Fixed header compacting, however this has had a large performance hit on flushes... Can't find a better way of achiving this though. Currently the entire file is effectivly being written twice, perhaps the compacting should occur during writes...?