Minor changes for performance/clarity