Updated cleanBefore()