Refactored code for #86.
Merge branch 'master' of https://github.com/ralucaa/PSD3-sem2