Most of this is torn with slight modifications from the Persona repo.