General fixes
- Make mean matrix calculation correct
- Fixed covariance matrix calculation
- Changed tabs into spaces