refactored and added gitignore