String utility class added and code decomposed.