Separates strings and puts them back together