Refactored to add feature generator.