refactored control initialization
update library to work with embed and object elements. update docs and demos.