docs and style cleanup
add embed.py (unfinished, avoiding merge conflict later)
merge