move determining the max screen id to a seperate function
move determining the max screen id to a seperate function

dkogan/notion,raboof/notion,raboof/notion,anoduck/notion,knixeur/notion,p5n/notion,anoduck/notion,dkogan/notion.xfttest,anoduck/notion,dkogan/notion.xfttest,neg-serg/notion,dkogan/notion.xfttest,p5n/notion,p5n/notion,knixeur/notion,p5n/notion,anoduck/notion,neg-serg/notion,dkogan/notion,knixeur/notion,dkogan/notion.xfttest,neg-serg/notion,knixeur/notion,anoduck/notion,raboof/notion,dkogan/notion,p5n/notion,dkogan/notion,neg-serg/notion,dkogan/notion,raboof/notion,knixeur/notion