BZ-0000: Code cleanup
- Adding basic modalController implementation to cut down on repetitive code and js payload size.