Factor feature extractor into its own file.