Refactored into seperate StringCaluclator class and file