Refactor MainTextSetter.