simplify function and rewrite rules
Merge pull request #3 from mrocklin/simplify

simplify function and rewrite rules