clean tasks during iterations and other enhancements