Optimize work with strings.
Add tests to Ant