fix sloppy comment writing
comment style
Fix some algebraic simplifications
Fix yet another error in the algebra code
More test cases for algebra