Added object-oriented approach of handling documents
Added final modifier to parameters
Added functionality for New menu item