Add max version detection
Rename variables