Renamed and moved unitsSetAssociation and relevant functions to a more generic version