rtest refactoring, started IdleDetection