- refactored repetitive code for various Index handlers