* added option for 'setModal' method.
 * removed unused code.