Added PreprocessData

Added a function PreprocessData which takes care of all steps required
for feature extraction.