Update .gitignore File And Refactor Code