Changed how window closing methods worked, centralised to External
library