Improved clean.rb