Refactorings.
Enabled save menu item for source windows.
Set edited state according to undo manager.