Copied over some stuff from production.