Assorted refinements and cleanup