Refactored panel directives.