fixed, refactored and commented the code
.gitignore
tests