Refactor client to enable upload of files. Add experimental support for uploading images. #97 #174