Most of the work was done by Jon Bernard with input from myself and sthen@. OK sthen@, abieber@. Thanks.