Optimized the code a little in faviour of setting a custom word length for each trimmed string,