speed-up code highlighting
replaced some enhanced for loops with regular ones to cut down on
object creation