Initial changes

Moved functions to functions.php.