Serialized array handling generalizations
Database connection normalizations
restructure gallery data array