completed refactoring FormatToString class and InputTextFieldListener
class