Re-factored the events a little bit. Made sure that .g files are not al...

...lowed but don't generate exceptions. Added a note to the navigator window if .g not .g4. Closing files now releases editor resources and so on. Lots more checking for errors and more logging. Fixes #93.