a few debugs, template and css refining, added gallery pagination