How to return change (utxo - inputs) to output address?
When you create a transaction, all inputs are used up completely. 

You then have to specify the destination addresses of the input money. Any amount without destination becomes available as transaction fee. Hence, you have to define the recipient, and send back the change to yourself.

In other words, add one of your own addresses as a second destination and assign the remainder of your inputs there.

If you haven't been doing so, you should experiment with transaction creation on the testnet. There you can learn without cost, because it behaves like Bitcoin, but its tokens are worthless.