Add close method to document
Implement save and save_as methods