System role front-end code refactor