Various fixes, unit tests

- Fixed some formatting issues in the code
- Throw a specific exception, rather than a generic Exception, on a Curl failure
- Specify that Curl is required within the composer.json
- Added unit tests, 100% coverage outside the service provider