Adds modal functionality