Some initial leaks fixed. More to come.
Some more leaks fixed.
One last leak fixed
Last leak detected is fixed. Deadlocks when printing performance of SyncIO should also be fixed.