Minor code beautification

Probably not as fast as before, but much more beautiful.