Refactor Application.panels