Further modularised client and more comprehensive tests