Added more template class and added some routing code