Move inline JS to 'binded' JS.

Signed-off-by: Dhananjay Nakrani <dhananjaynakrani@gmail.com>