Exit when done, memory leak checked and corrected.
Fixing the stopping thing who previously sucked