finish refactoring to using Guzzle and fixing the unit tests