Interestingly you failed to spot the rather glaring error I made. 20 checks at 20ms each will only take maximum of 400ms, not nearly 5 seconds as I stated. I've fixed that and can't really complain as I suspect you're the only person who read it :p
Wasn't interested enough to check all those things precisely
