Patches to insertion code. Added tests for sequential and reverse order
insertion.