Cleaner index function in action routines