Javascript cleanup.

Signed-off-by: Zann St Pierre <mail@zann.com.au>