Refactor Modal to modern service