MIDI CC Serial - LED Brightness Issue

I actually don't know at all.

I'm very new to programming and was really just using this person's code as a base. Not sure why she constructed it this way.

I'm sorry to ask this, but what would the preferable code look like?