Another thing you could do is creating a new script named "Panels.c" or something - Then write your panel codes in there, then include the script into your main script.
I know this is not compressing the code in any way - but it sure makes it easier to sort things if you've got a lot of code.
Hope this helps a bit
"If you say 'plz' because it's shorter than 'please', then I'll say 'no' because it's shorter than 'yes'.