Generalize NifWrapper for general purpose use