Added a rudimentary algorithm to calculate R^2.
Add two more algorithms to calculate Xe. One actually works!
Fix compiler warnings (mostly unused variables)