Some minor JS improvements.