query construction more railsy
refactor photo controller