Refactor all features and config