Updated files, added a clean file that deallocates memory. No mem leaks reported with memcheck.