Upgraded Insertion algorithm. Added delete functionalities

Please test Delete functionalities... I didnt test it. And, I'm not sure
if the code works or not. Just wanted to try.