Refactored popups to use layouts and components