Make the code a little cleaner

Please carefully take a look at my changes.

By the way, you don't have to merge this.