First stab at pulling together the work on the embed #99

Still lots to do! The comments in the code are important.