Added presence detection.