Code review

Code review + one fix in the export_roles_permissions_grant_permissions(...) function.
We still need to make sure that the exported code creates missing roles if any (see TODO in the code).
its roll ids and name. So we can leave the variable as roles, I guess.