put screensaver check into separate function aswell, initialise doDim (makes else-branch unneccesary)