Code changed to use dirty cleaning