Optimizing the Ukkonen version so it's kinda cooler.