Originally committed to SVN as r857.
Other minor fixes/cleanup Originally committed to SVN as r753.
Originally committed to SVN as r352.