Cleaned modalctrl provider to modularize it