Remove unused variables and parameters.
Correct shadowing of variables that already exist.
Use unsigned integer for iteration.
fixup for unused variables.
Remove usage of an uninitialized variable if the curl query fails.
Merge pull request #66 from robertmaynard/fix_warnings

Fix warnings