Added basic simplify code.