Move the index component to the App server. The Index component can be kept separate from WFEs as it is the search index which is accessed by crawl and analytics components and can be kept different from WFE server processing (which is to serve user requests). Index Partitions are not recommended on WFEs.
You can continue to keep the Query components on WFEs or move them to App server. Both architectures are followed. The reason query components can be kept in WFEs is that when user issues the query, they go through the query component first. If it is configured on App server, it does not affect search. This is just logical placement of services based on available infrastructure.