From rust to robust for major Spanish refinery