Code review clean up, optional permissions.