Ot test2

This supersedes PR109 and PR111. It was rebased to the latest upstream/develop, fixed some problems after rebase, and reinstated the showincoming and showoutgoing commands that Chris explained needed to stay in.