created client library, cleaning up code and building unit tests