Display control

This fixes many of the problems with panels not displaying properly when first shown