Added utility functions to make pages consistent

Also php-ified things more. Everything is a .php file, no .html files.
not sure if this is a good thing but it can let me take advantage of the
util.php functions, which reduces code duplication.