Add MotionDetector class