Clean up gem references