If you have the album `id` then you shouldn't need to store the `ids` separately. You can always get a list of photos in an album by calling `/photos/album-:id/list.json`. This should result in significantly less code...