Changed generic view to class-based view.