Some obvious optimizations