Using internal pull-up resistors by digitalWrite()

In
"Read Two Switches With One I/O Pin" there is:
"There are handy 20K pullup resistors (resistors connected internally between Arduino I/O pins and VCC - +5 volts in the
Arduino's case) built into the Atmega chip upon which Freeduino's are based. They are accessible from software by using the
digitalWrite() function, when the pin is set to an input."

So lets say that I would like to resign from external pull-up resistors.
I have this code:

const int switch1 = 2;
const int switch2 = 3;
const int light1 = 4;
const int light2 = 5;

void setup() {

pinMode(switch1, INPUT);
pinMode(switch2, INPUT);
pinMode(light1, OUTPUT);
pinMode(light2, OUTPUT);
}

void loop() {

if (digitalRead(switch1) == HIGH & digitalRead(switch2) == HIGH) {
digitalWrite(light1, HIGH);
digitalWrite(light2, HIGH);
}
}

And I am planning to change it for that one where I am using internal pull-up resistors:

const int switch1 = 2;
const int switch2 = 3;
const int light1 = 4;
const int light2 = 5;

int state1 ;
int state2;

void setup() {

pinMode(switch1, INPUT);
pinMode(switch2, INPUT);
pinMode(light1, OUTPUT);
pinMode(light2, OUTPUT);
}

void loop() {

digitalWrite(light1, LOW);
state1 = digitalRead(switch1);

digitalWrite(switch2, LOW);
state2 = digitalRead(switch2);

if (state1 == 1 & state2 == 1) {
digitalWrite(light1, HIGH);
digitalWrite(light2, HIGH);
}
}

Is that ok? As I doubt of it but I have no idea how to do it different..

There is no need to digitalWrite() the HIGH or 1 to the Input pins inside of loop(). Generally people will enable the pull-ups right after declaring the pin as INPUT, in setup().

Also remember that if an INPUT is being pulled-up, that the "default" state is HIGH, not LOW.

I have this code:

if (digitalRead(switch1) == HIGH & digitalRead(switch2) == HIGH) {

And I am planning to change it

state1 = digitalRead(switch1);
state2 = digitalRead(switch2);
if (state1 == 1 & state2 == 1) {

Aside from storing the switch state in a variable, and comparing that variable to a constant instead of a keyword, you haven't changed diddly.

What was wrong with the original readable code, except that the state of a press switch changed from HIGH to LOW when using the internal pullup resistors?