Remove duplication in constructing trello client