Fix bug in C++/haskell interface of matrix solving. (ammended)
Broke up MotionData file into smaller modules (for better compilation
times)