Removed C Style

Converted C style heap allocations to c++ vectors.