What were some of Egypt's foreign influences?