Added garbage collector to destroy unnecessary objects.