Fixed: Lot of memory leaks. Thanks to valgrind.