Naive speedups
Rewrote with a (faulty) 2 lock implementation