Make master/index more generic