Refactor UI/StackedPanel