Split key publishing into multiple functions