Fixed the memory leak. Preparing to start cleaning things up.