Added default config, which is overridden first by HTML data attributes, and second by argument passed to Gallery object.
Flattened config object for simplicity.