Reorganize order of code - set variables first; cleanup display