adding some database compacting cleanup promises