Replaced dynamic array with vector.