Reformat code
Permissions and role updating