Updates to cleanup code