Replaced deprecated by new api. Cleaned up ModalProvider so no dangling references are around.
Merge pull request #532 from kazoompa/removed-deprected

Replaced deprecated by new api.