Added dirty/clean functionality