Changed the way the Modal works to be more consistent and more modular.