Various (unconsequential) cleanup changes

The biggest change here is moving the css to a separate file to avoid repeating it in all the example files.
This makes them simpler to inspect, apart from all the advantages of the DRY philosophy.
There are also whitespace tweaks, edits to allow validation, and a typo fix.