Move init functions out of Embed source