Fix resource name collisions
Use R class of APG package