Refactoring view for dashboard