Optimize expressions and program logic

Consider the following guidelines:

IBM Copyright 2003