fixed small mem leak
fixed a bug which did not clean up correctly if starting the same file again over the recent debugged file menu
some refactoring