Tweaks to include a c++ matrix inversion function.
Final changes before class.