End view refactoring (Now used only class-based views)