Changed constructor to private; added protocol
Refactor client