Refactoring browse_foreigners.php