Add test cases.
Simplify implementation of "Left" and "Right" terms.