Added logic to handle photos, more TODOs added