Using regex instead of str for spliting
Updated the trim script to have smaller chunks and actually trim values