finished refactoring, added comments (explanations) to each method, added .gitignore