move validate URL function to bottom

(it screws up syntax highlighting & doesn't need to be in the middle)