Improved design, refactored code, added  new features, comments, unit tests

More details about work that was done you can find in internal notes and push comments for every file I changed.