Entitlements optimization. Improved logging.