Style and formatting changes.

Also fixed an error in js.