Generalize string functions; add score function bases.