Made changes to Stat Functions, now with Switch case
Feature extraction almost complete. Check for comments!