Cleaned up some variables and improved stop() to clean up more stuff.