Refactored Index-based functions (#23).