change program exit
add OpenGL cleanup code