Refactored Master and Client to accepts opts, or use defaults