Added Stu's changes to IP validator