Replace function based views with class based ones