adaptations for cpf/schism; minor cleanup