Some refactoring for features.