Refactoring

* Minor and major bug fixes
* Code refactoring and documentation
* Remastering of messages displayed to users