Shift the template partial logic to template class