Client struct, url encoding "fix", file functions/structs