Update detection and variables