Updated to use the XAResource API