Removed redundant SetupXAtoms() function