Removed commented code and relevant method externalReferencesFor

function externalReferencesFor isn't used anymore