more cleanup of old elasticsearch code