XWIKI-8771 : Removing a comment switches PR. Fix a few deprecated calls.