For example, Poppers (amylnitrate) only has 1 oxygen molecule extra, apart from that it is identical to XTC. Do they have the same effect? No, not at all. Are they categorised together?
Where did you get that information? I am no chemist, but anybody can look up the chemical structures of MDMA and amyl nitrite. If what you say is true then considering the chemical formula for amyl nitrite C5H11NO2, minus an oxygen would make MDMA C5H11NO. Unfortunately MDMA is C11H15NO2, and the chemicals are structured very differently as you can see.

Mescaline is somewhat chemically similar to MDMA, both are substituted phenethylamines. Effects I cannot comment on, mescaline is definately more psychedelic though.