Debugging functions.php
Tidied up functions.php
Fixed register.php problems