Remove unused messages, add permissions.