Renamed Dispose method to close.