New power deal saves 500 jobs at smelter