Fixed some logic issues with embedding/decoding, finished decoding