Fixed insert and added remove function