More changes such as interface and added comments in the insert function