Optimization working with new angles.
Add length() method to mprim.
Fix bug.