Added delimit & sort template functions, tests and docs