Delete Polygons between facing normals

I had this script done here on Scriptspot some time back. It deletes facing polygons, however it only works when faces are exactly facing eachother and on the exact same grid point, ( cant even have a .001 offset between them or it wont work.

I was wondering if someone could fix it up so that when deleting the faces a set range could be set up so even if the faces aren't exactly aligned or overlapping than it can delete the faces.

Would be nice if it worked within a single mesh as well, not just multiple mesh.
struct faceData
public owner, public center, public area, public normal, public i;

-- collect all data for comparison
local faceDataNArr = for o in geometry where classOf o == Editable_Poly collect
for f = 1 to (polyop.getNumFaces o) collect
faceData o (polyop.getFaceCenter o f) (polyop.getFaceArea o f) (polyop.getFaceNormal o f) f;

-- compare all faces and collect equal ones
local equals = #()
for x in faceDataNArr do
for i in x do
for y in faceDataNArr where (x != y) do
for o in y do
if (( == AND i.area == o.area) AND i.normal == -o.normal) do (append equals o);

-- sort them by owner(object)
local sortedOwners = #();
local sortedVals = #();
for each in equals do
local found = findItem sortedOwners each.owner

if (found != 0) then
sortedVals[found][each.i] = true;
append sortedOwners each.owner;
append sortedVals #{each.i};

-- now delete the equal ones
for i = 1 to sortedOwners.count do
polyop.deleteFaces sortedOwners[i] sortedVals[i];