Finished loop pre-in-postorder functions and loop_insert.