[#12] Starting from a clean slate

With no tests to fix all the memory leaks due to the refactoring.