Implement Test Client, and move common functionality to Common module.