Refactor modal views.

Change-Id: I2bc9348484322c850dcea295e59b9d182e6dc81a