Clean up a bunch of hard coded indices using generate blocks