Replaces refs to atoms for performance