Refactored index method to account for belonging to an equipment model and fixed variable name problem