Condensed code for split names

Still have to work out a bug in the titles.