removed global function after window is closed.
Merge branch 'master' of https://github.com/evotech/MarexPOC