Refactoring cred views
Refactored all but search view