Separated modal view from code