Added exit function to global context