Feature extraction much more efficient. Code 80% commented.