Various JavaScript niceties.