Some minor fixes and more code (style) cleanup.