Added clear_foreign_config method
Improvements