Replaced carray<> with std::vector<>