Refactor Modal