Converting client over to curl, removing custom Exceptions.