Switched the _Closed() function with _Closing() to get better control of the program and the closing of it.