Fix line endings to Unix.

Standardise indentation, spacing and braces.

Allow overriding the list of buckets, default to all buckets.

Hide a lot of unwanted output from Curl.