Fixed bugs + insertion working