new public method removeReferences and refactored destroy method

Small changes for convenience.