Removed init UI function
Updated the code to PEP8 compliance. Added exception handling to Open file dialog.