Refactored modal