Fix generic view; refactor