Limit open connections to 2.
Serialize download of local and global tiles to avoid deadlocks.
Add metadata.
Minor changes.