Embed types, fixes #271

See docs