add tests for helpers_for_string, refactoring and fix bags. Tests, thanks