Added some comments and a finalizer.