Split out from Analects project.