Consolidate indice generation into refresh, update them properly

Moving all the find_ bits into 1 function makes the code (and .h file) easier to read overall. Added calls to refresh when parts are added or removed so that the cache indices don't go out of synch (as much). Removed some calls to find_parts(), the calls to refresh() in install/remove parts take care of that now.