added ability to create callback cleaning functions for indexed content