Which other countries was Spain at war with during the 16 century