added debugging lines to insert node functions
Rewrote and simplified insert functions