Add a Synapse client, a simple count DAO, and fix bugs found by code metrics.