Implement new view into sample project.

Fixed up some bugs and also added new options into sample project.