views: switch from functional views to CBV.