Move feature extraction to its own module.