Added version check before sending priority/retention to tvh server.
Minor cleanup and fixes for the handling of the new attributes.