Starter Persona code, largely from the Persona tutorial.