Moved scan up a little to stop artefacts
Replacing old rzFunction with new one

Speed tested them, old is considerably (1/3 ish) faster