refactored code and created simple tests
Merge branch 'master' of https://github.com/RomanXdd/TextStyle