Changes suggested by @bthebaudeau.