Fix file modes.
Fix whitespace.
Clean up stylesheets and templates a bit.

This fixes some typos, makes selectors less specific, converts
background images used as content into real images, resolves naming
conflicts, removes remnants, and separates out template functions.