Reworked ds reference and ascopy behaviour