code cleanup: index