More refactoring with indexed expressions