minor bug fixes & implementation of embedding in analysis