Add Script returns now script element
Added require for goog.registry
Improved the check whether element has already been rendered.
Fixed formatting