Embed: added visibility check for embedded version, due to load/unload events not always firing.
Embed: removed console debugging.