remove end of line whitespace
Side panel and dirty issues

fixes issue #116

Still some problems though:
1. If both editors dirty during a switch, dialog pops up twice
2. confirm dialog is ugly
3. other problems regarding selection and dirty text placement that have to do with asynchronous loading of editors.

Will raise new issues for these.