Add Elegans.Embed and some refactoring