Remove global variable x