remove old index-based code
fix includes