Add more class template and infrastructure bits from the previous codebase