refactored control initialization
update library to work with embed and object elements. update docs and demos.
Merge branch 'master' into gh-pages