Refactored Dispose in RMModel

There was a bug in the finalizer of RMModel.  Fixed and refactored.