Cleaned up code, splits the inputted array so that the code can translate multiple words instead of one.