some optimisations in Permissions and Styles