Modal helper

I wrote tests for and documented the modal helper.