Minor code cleanup and UI adjustments.