Refactored open method
Added drag and drop support for files