added polytomous key tests and initial developments on caching