Refactored modal code into separate functions for each style of modal rather than an awkward dictionary blob containing all those options.