Cleaned up code and made it so that creating

multiple Tasks is impossible. Made sure that resources are able to be
cleaned up. However memory creep still exists for some reason.