Performance fixes and improved logic to center photos. Also implemented img double click to open photo in new tab.