Messed around with regex, now more streamlined. More to come.