added dynamically load the js file and updated the documentation

Signed-off-by: filipe garcia <filipe.c.garcia@gmail.com>
add close widget with cleanup

Signed-off-by: filipe garcia <filipe.c.garcia@gmail.com>