Refactored write critical path. Removed two locks and 2 data structure copies. Not integrated into the main classes yet