Fixed bugs and memory leaks.
Added more assertions for the DataContainer.
Finished the move to linear non multi-threaded DataContainer.