Refactor of functions.php

This pull requests is a refactor of functions.php.  It updates indentation, normalizes inline comments, adds proper prefixes to functions, adds localization support, refactors the custom header, and has other minor cleanup.  There is still quite a bit more to do, but this pull request should set the stage for it.