Redo version checking code