Optimize variables

Consider the following guidelines: