Reverting back to original feature extraction code with minor changes