Exit funtion

Hitting the escape button now exits the program