Minor fixes.

Removed extraneous debug statement. Optimized loop processing
slightly.