Deleted un-used function
Various changes. Renamed SelectDiagramState to just SelectState. Updated source code generator to be able to save individual files. Updated diagram dialog to prompt to save if you close a diagram.