Further tweaked feature extraction (deals with training vs. testing better now).