Created index method with view and tests.