CHS plans $406 million Montana refinery upgrade