reformat and cleanup panel screen code

WARNING lots of whitespace changes!
Gratuitous changes but nothing substantial