import changes from Alans branch, http://bazaar.launchpad.net/~alan-paterson/openpetraorg/20130115_alan_net_remoting/revision/2170