Extract easy-modal code into a service