Finilizing the project: import cleanup, code cleanup and adding comments