Added the logic to dynamically assign attributes to fiducials, rather than hard-coding them