Changed structure of if to be more readable.

Greatest commits will go into my self-published coffee table book.