Unified the append and prepend functions of the Cascade by adding an insertion function