Moved block of code to a more sensible location.
New style for panel.