Feel free to use this for your own client. Also feel free to make pull requests to improve my code.