EEG feature extraction and artifact removal