Add cleanups for elasticsearch indexing