Certificate creation

Create certificate when the a questionnaire has been completed.  Also added basic guard test.