Tanev signs four-year, $18 million contract with Flames