Moved ipv6 validation in to function.class.php and made the validate code a lot prettier