refactoring/modularizing modal views