Refactored base class for calculations moving some functionality into kenyacore