Refactor role.js to individual control files