TW: Added constructor to accept a client.