Added functions from palestrina.