Refactor views to reduce complexity