added Database functionality and new Photo DetailVC