Make solve accept Vector and dat objects.