Refactor for r10k