Added exitOnAppWinClose by default and then tidied up the source code. Aim is to deal with as many cases as possible of the application being closed but the binaries continuing to run.