Refactor role resource