Division and simplification of expressions