Clean-up primitive references