Simplification and optimization