some crud view refactoring