Embedding encoding

r+ @larsbergstrom ?