Refactoring the index and using named scopes to clarify the whole.