Unsaved documents support
Remove unused code
Error handling support
Update test prog to include header file
Basic comment support