Add a simple optimization to simplify the input to