Small javascript and some style fixes.

Syncing to make merging easier.