code refactoring

@koppen wrote: *You do not need the `payload_repo` variable here or the
return statement. We can simply rely on the implicit return of the last
evaluated call, which is the `repositories.select` call*