fixed some issues and merge conflict. added comments to improve code quality
added gitignore file