Changed integer indices to pointer, fixed an insertion bug that didnt consider data inserted at the current node