Declaring analog pins as digital and setting up with a loop

Goddamn this forum is quick and to the point.

Yes it does, it controls relays and the problematic line does exactly that.