Few more changes to patricia

Introduced the patricia insert, delete codes and changed the return
values and types.