Cherry-picking ECF flexible configurations
This cherry-picks the changes from !21615 (merged) as well as fixes a number of coding style issues.
Edited by Jason Robert Veatch
This cherry-picks the changes from !21615 (merged) as well as fixes a number of coding style issues.