Added exception handling, removed unnecessary import statements, improved code style, added .csv files to .gitignore