Simplify linear expressions.
Merge pull request #112 from pjonsson/simplify-linear

Simplify linear expressions.