Solenoid and air operated valves