Extracted functions on IndexView. No more functions inside functions