Add insert functionality and some comments