Upgrades to utility code for new formats, and a few more database tweaks.