Made gallery somewhat more standards-compliant.