Put getMaxPriority in a separate function.
Put getMaxPriority in a separate function.

pavlovicnemanja/superdesk,Aca-jov/superdesk,akintolga/superdesk,petrjasek/superdesk-ntb,pavlovicnemanja92/superdesk,marwoodandrew/superdesk,hlmnrmr/superdesk,akintolga/superdesk-aap,akintolga/superdesk,plamut/superdesk,gbbr/superdesk,mugurrus/superdesk,ioanpocol/superdesk-ntb,superdesk/superdesk,vied12/superdesk,amagdas/superdesk,petrjasek/superdesk-ntb,superdesk/superdesk-ntb,petrjasek/superdesk,ancafarcas/superdesk,plamut/superdesk,amagdas/superdesk,plamut/superdesk,mdhaman/superdesk,ioanpocol/superdesk,vied12/superdesk,thnkloud9/superdesk,mdhaman/superdesk-aap,sivakuna-aap/superdesk,akintolga/superdesk,petrjasek/superdesk,verifiedpixel/superdesk,mdhaman/superdesk,sivakuna-aap/superdesk,darconny/superdesk,pavlovicnemanja92/superdesk,pavlovicnemanja/superdesk,mdhaman/superdesk-aap,mugurrus/superdesk,akintolga/superdesk-aap,marwoodandrew/superdesk-aap,pavlovicnemanja92/superdesk,superdesk/superdesk-aap,marwoodandrew/superdesk-aap,superdesk/superdesk-aap,petrjasek/superdesk-ntb,marwoodandrew/superdesk,verifiedpixel/superdesk,pavlovicnemanja/superdesk,ioanpocol/superdesk-ntb,verifiedpixel/superdesk,sjunaid/superdesk,darconny/superdesk,pavlovicnemanja/superdesk,sivakuna-aap/superdesk,Aca-jov/superdesk,mugurrus/superdesk,vied12/superdesk,amagdas/superdesk,fritzSF/superdesk,fritzSF/superdesk,liveblog/superdesk,akintolga/superdesk,superdesk/superdesk-aap,gbbr/superdesk,petrjasek/superdesk,pavlovicnemanja92/superdesk,darconny/superdesk,marwoodandrew/superdesk-aap,marwoodandrew/superdesk,superdesk/superdesk-ntb,amagdas/superdesk,superdesk/superdesk,mdhaman/superdesk-aap,plamut/superdesk,petrjasek/superdesk,akintolga/superdesk,mdhaman/superdesk,superdesk/superdesk-aap,ancafarcas/superdesk,verifiedpixel/superdesk,sivakuna-aap/superdesk,pavlovicnemanja92/superdesk,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb,hlmnrmr/superdesk,fritzSF/superdesk,vied12/superdesk,liveblog/superdesk,liveblog/superdesk,mdhaman/superdesk-aap,superdesk/superdesk,ioanpocol/superdesk,plamut/superdesk,verifiedpixel/superdesk,liveblog/superdesk,thnkloud9/superdesk,amagdas/superdesk,Aca-jov/superdesk,akintolga/superdesk-aap,hlmnrmr/superdesk,fritzSF/superdesk,vied12/superdesk,thnkloud9/superdesk,ioanpocol/superdesk,akintolga/superdesk-aap,marwoodandrew/superdesk,sjunaid/superdesk,superdesk/superdesk-ntb,sjunaid/superdesk,marwoodandrew/superdesk-aap,sivakuna-aap/superdesk,ancafarcas/superdesk,marwoodandrew/superdesk,gbbr/superdesk,fritzSF/superdesk,petrjasek/superdesk-ntb,liveblog/superdesk,superdesk/superdesk