Add delete index and delete mapping functions, and delete the unused
functions.