Implement rudimentary simplification of expressions