Add memo-clean function