Cleanup, some backwards compatibility for permissions, add permissions check to menu toggle