cruft removal and tuning