Plugin development: problems assigning units and returning text