CSS generation improvements

As discussed on [Stack Overflow](http://stackoverflow.com/a/4185556/24874):

* Use default dimensions in more cases
* Drop redundant `px` suffix on zero dimensions
* Remove extra whitespace in CSS

Also a few statement termination things, accidental global leakage and removal of unused vars.

Normally I'd do all of these as separate PRs but seeing as you seemed receptive to them on SO I thought I'd just bundle them all here. You can pick commits if you like though.