Added handling for document closing
Added default methods for document saving (file chooser dialog, class delegator)