Needed: more efficient code, need to learn about functions i think!.....help!

It's the millis(); thing
Blink Without Delay