Redesign validation for registration

-Create validation.php to hold validation code
-Clean up register.php
-Clean up various code