refactor class and add unit tests
Merge branch 'master' of github.com:Starmind/Pygments