Also, I have the relay cycle as the pir sensor becomes active to ensure that it has progressed from the setup to loop function. It does go high then low. Thanks, everyone for the responses I will do some light reading on your recommendations.
Got it! I just wrote it, so I haven't thought it through thoroughly. I will do just that and also research on machine state etc. I think I was over complicating things.