Cleanups.
Add support for surface anti-aliasing.  Cleanups to follow.