Added trigger removal function.
Added first function to get index of first element.
Added trigger code generator.