Simplify expressions to use vectorized functions