side panel and layout refactor