fix tests, refactor string formatters