added pictures database and fixed up looping pics page