gallery js, styling, new tempate logic