Make specs to test the actual functions of the package.
Extract common code that transform selected text.
Merge pull request #3 from BrightIT/master

Add unit test and shorten the core code.